<template>
  <div>
    <div class="navbanner lunbo" >
			  <img src="../../static/images/teachers.png" class=""/>
    </div>
   
    <div class="container">
      <h1 class="t_nav">
        <p class="n1">师资队伍</p>
        <div class="rt">当前位置：
            <el-breadcrumb separator-class="el-icon-arrow-right">
              <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
              <el-breadcrumb-item :to="{ path: '/teachers' }">师资队伍</el-breadcrumb-item>
            </el-breadcrumb>
        </div>
      </h1>
      <div class="share">
        <ul>
          <li v-for="(temp,index) in teachersList">
            <div class="shareli"  @click="toDetail(temp)">
              <a href="javascript:void(0);">
                <i>
                  <img v-if="temp.imgSrc" :src="preUrl+temp.imgSrc">
                </i>
                <h2>
                  <b v-highlight  v-html="temp.content" ></b>
                </h2>
                <span>{{temp.title}}</span>
              </a>
            </div>
          </li>
        </ul>
      </div>

      <!--分页-->
      <!-- <div class="block relative teachers" style="text-align: center;">
        <el-pagination
          @current-change="handleCurrentChange"
          :current-page.sync="currentPage"
          :page-size="pageSize"
          layout="total, prev, pager, next, jumper"
          :total="total">
        </el-pagination>
      </div> -->
    </div>
  </div>
</template>

<script>
import request from "../utils/request";
export default {
  name: 'teachers',
  data () {
    return {
      teachersList: [],
      url: {
        teachersList: "/sunNews/list",
      },
      preUrl: "http://localhost:8080/jeecg-boot/sys/common/static/",
    }
  },
  components: {
    // 注册组件
  },
  created () {
    this.getStoryList();
  },
  methods: {
     toDetail(data) {
      this.$router.push("./subjectInfo?id=" + data.id);
    },
    //获取儿童故事
    getStoryList() {
      request
        .get(this.url.teachersList, {
          params: {
            pageSize:12,
            category:9,
          },
        })
        .then((res) => {
          if (res.data.success) {
            this.teachersList = res.data.result.records;
            console.log(this.teachersList);
          }
        })
        .catch((error) => {
          console.log(error);
        });
    },
  }
}
</script>

<style scoped>
.share {
  min-height: 550px;
}
.resImg {
  width: 100%;
  height: 160px;
  vertical-align: middle;
}
.el-drawer {
  min-width: 400px;
}
</style>
